var ajaxUrl = window.location.protocol + '//' + window.location.host + window.location.pathname;
//window.location.protocol + '//' + window.location.host + window.location.pathname
var rootPath = 'frontend/';
var scriptPath = rootPath + 'js/fw/';
var libPath = rootPath + 'js/lib/';
var customPath = rootPath + 'js/custom/';
var customObjectsPath = customPath + 'custom-objects/';
var customApplications = customPath + 'custom-applications/';
var utilPath = scriptPath + 'utilities/'
//required variable is the scriptList to load the necessary scripts
//required static function is the fw_start_app

var mainContainerId = 'parent-body-content';
var mainContainerHeaderTitleId = '';
var mainContainerHeaderMenuId = '';

//handles the context of the callback method during an ajax request, usefull when using json closures
//taken from http://knol.google.com/k/jquery-callback-contexts#
// $.context
jQuery.extend(
{
  context: function (context)
  {
    var co = 
    {
      callback: function (method)
      {
        if (typeof method == 'string') method = context[method];
        var cb = function () { method.apply(context, arguments); }
        return cb;
      }
    };
    return co;
  }
}); 

//global ajax setup for all ajax requests
//set the global ajax setup parameters for jquery
$(function (){
	$.ajaxSetup({
		url: ajaxUrl,
		type: "POST",
		dataType : 'json',
		cache: false
	})
});